import request from '@/utils/request'

// 获得难题分页
export function getPromblemPage(params: any) {
  return request({
    url: '/project/problem/page',
    method: 'get',
    params,
  })
}

// 获得难题明细
export function getPromblemDetails(params: any) {
  return request({
    url: '/project/problem/get',
    method: 'get',
    params,
  })
}

// 导出难题 Excel
export function getPromblemExportExcel(params: any) {
  return request({
    url: '/project/problem/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 创建难题
export function postProblemCreate(params: any) {
  return request({
    url: '/project/problem/create',
    method: 'post',
    data: params,
  })
}

// 更新难题
export function putProblemUpdate(params: any) {
  return request({
    url: '/project/problem/update',
    method: 'put',
    data: params,
  })
}
